import { Component } from 'react'
import { View, Text } from '@tarojs/components'
import './child.less'

export default class Child extends Component {

  clickHandle = () => {
    this.props.onDeleteCard()
  }

  render() {
    return (
      <View className='container' onClick={this.clickHandle.bind(this)} >
        Child ----》
        <Text>{this.props.tt}</Text>
        <Text>{"姓名：" + this.props.info.name + "   年龄：" + this.props.info.age}</Text>
      </View>
    )
  }

}

// *** 给组件props设置默认值 ***
Child.defaultProps = {
  info: {
    name: 'lyx',
    age: 8
  }
}